<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>PowerVR SDK</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<table width="100%">
  <tr>
    <td width="33%">
      <p align="left">&nbsp;<a href="http://www.imgtec.com"><img border="0" src="IMGLogo.jpg" width="200" height="30"></a></p>
    </td>
    <td width="33%">
      <p align="center"><font color="#808080" face="Arial" size="2">PowerVR Software Development Kit</a></font></p>
    </td>
    <td width="34%">
      <p align="right"><a href="http://www.powervr.com"><img border="0" src="PVRlogo.jpg" width="200" height="27"></a></p>
    </td>
  </tr>
</table>
<hr>
</head><body>
<!-- Generated by Doxygen 1.3.6 -->
<div class="qindex"><a class="qindex" href="index.html">Main&nbsp;Page</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="globals.html">File&nbsp;Members</a></div>
<h1>PVRShell.h</h1><a href="PVRShell_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 <span class="comment">/******************************************************************************</span>
00002 <span class="comment"></span>
00003 <span class="comment"> @File         PVRShell.h</span>
00004 <span class="comment"></span>
00005 <span class="comment"> @Title        PVRShell</span>
00006 <span class="comment"></span>
00007 <span class="comment"> @Version      </span>
00008 <span class="comment"></span>
00009 <span class="comment"> @Copyright    Copyright (C)  Imagination Technologies Limited.</span>
00010 <span class="comment"></span>
00011 <span class="comment"> @Platform     Independent</span>
00012 <span class="comment"></span>
00013 <span class="comment"> @Description  Makes programming for 3D APIs easier by wrapping surface</span>
00014 <span class="comment">               initialization, Texture allocation and other functions for use by a demo.</span>
00015 <span class="comment"></span>
00016 <span class="comment">******************************************************************************/</span>
00017 
00018 <span class="preprocessor">#ifndef __PVRSHELL_H_</span>
00019 <span class="preprocessor"></span><span class="preprocessor">#define __PVRSHELL_H_</span>
00020 <span class="preprocessor"></span>
00021 <span class="comment">/*****************************************************************************/</span>
00188 <span class="comment">// Uncomment to enable the -fps command-line option</span>
00189 <span class="comment">// #define PVRSHELL_FPS_OUTPUT</span>
00190 
00191 <span class="comment">/*****************************************************************************</span>
00192 <span class="comment">** Includes</span>
00193 <span class="comment">*****************************************************************************/</span>
00194 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
00195 
00196 <span class="preprocessor">#define EXIT_NOERR_CODE 0</span>
00197 <span class="preprocessor"></span><span class="preprocessor">#define EXIT_ERR_CODE (!EXIT_NOERR_CODE)</span>
00198 <span class="preprocessor"></span>
00199 <span class="comment">// avoid warning about unused parameter</span>
<a name="l00200"></a><a class="code" href="PVRShell_8h.html#a0">00200</a> <span class="preprocessor">#define PVRSHELL_UNREFERENCED_PARAMETER(x) ((void) x)</span>
<a name="l00201"></a><a class="code" href="PVRShell_8h.html#a1">00201</a> <span class="preprocessor"></span><span class="comment">/*!***********************************************************************</span>
00202 <span class="comment"> *  Keyboard mapping.</span>
00203 <span class="comment"> ************************************************************************/</span>
<a name="l00204"></a><a class="code" href="PVRShell_8h.html#a2">00204</a> <span class="keyword">enum</span> <a class="code" href="PVRShell_8h.html#a72">PVRShellKeyName</a>
00205 {
00206     <a class="code" href="PVRShell_8h.html#a72a3">PVRShellKeyNameNull</a>,
00207     <a class="code" href="PVRShell_8h.html#a72a4">PVRShellKeyNameQUIT</a>,
<a name="l00208"></a><a class="code" href="PVRShell_8h.html#a72">00208</a>     <a class="code" href="PVRShell_8h.html#a72a5">PVRShellKeyNameSELECT</a>,
00209     <a class="code" href="PVRShell_8h.html#a72a6">PVRShellKeyNameACTION1</a>,
00210     <a class="code" href="PVRShell_8h.html#a72a7">PVRShellKeyNameACTION2</a>,
00211     <a class="code" href="PVRShell_8h.html#a72a8">PVRShellKeyNameUP</a>,
00212     <a class="code" href="PVRShell_8h.html#a72a9">PVRShellKeyNameDOWN</a>,
00213     <a class="code" href="PVRShell_8h.html#a72a10">PVRShellKeyNameLEFT</a>,
00214     <a class="code" href="PVRShell_8h.html#a72a11">PVRShellKeyNameRIGHT</a>,
00215     <a class="code" href="PVRShell_8h.html#a72a12">PVRShellKeyNameScreenshot</a>
00216 };
00217 
00218 <span class="keyword">enum</span> <a class="code" href="PVRShell_8h.html#a73">PVRShellKeyRotate</a>
00219 {
00220     <a class="code" href="PVRShell_8h.html#a73a13">PVRShellKeyRotateNone</a>=0,
00221     <a class="code" href="PVRShell_8h.html#a73a14">PVRShellKeyRotate90</a>,
<a name="l00222"></a><a class="code" href="PVRShell_8h.html#a73">00222</a>     <a class="code" href="PVRShell_8h.html#a73a15">PVRShellKeyRotate180</a>,
00223     <a class="code" href="PVRShell_8h.html#a73a16">PVRShellKeyRotate270</a>
00224 };
00225 
00226 <span class="comment">/*!***********************************************************************</span>
00227 <span class="comment"> *  Pointer button mapping.</span>
00228 <span class="comment"> ************************************************************************/</span>
00229 <span class="keyword">enum</span> <a class="code" href="PVRShell_8h.html#a74">EPVRShellButtonState</a>
00230 {
00231     <a class="code" href="PVRShell_8h.html#a74a17">ePVRShellButtonLeft</a> = 0x1,
00232     <a class="code" href="PVRShell_8h.html#a74a18">ePVRShellButtonRight</a> = 0x2,
<a name="l00233"></a><a class="code" href="PVRShell_8h.html#a74">00233</a>     <a class="code" href="PVRShell_8h.html#a74a19">ePVRShellButtonMiddle</a> = 0x4
00234 };
00235 
00236 <span class="comment">/*!***********************************************************************</span>
00237 <span class="comment"> * @Enum prefNameBoolEnum</span>
00238 <span class="comment"> * @Brief Boolean Shell preferences.</span>
00239 <span class="comment"> ************************************************************************/</span>
00240 <span class="keyword">enum</span> <a class="code" href="PVRShell_8h.html#a75">prefNameBoolEnum</a>
00241 {
00242     <a class="code" href="PVRShell_8h.html#a75a20">prefFullScreen</a>,             
00243     <a class="code" href="PVRShell_8h.html#a75a21">prefIsRotated</a>,              
<a name="l00244"></a><a class="code" href="PVRShell_8h.html#a75">00244</a>     <a class="code" href="PVRShell_8h.html#a75a22">prefPBufferContext</a>,         
00245     <a class="code" href="PVRShell_8h.html#a75a23">prefPixmapContext</a>,          
00246     <a class="code" href="PVRShell_8h.html#a75a24">prefPixmapDisableCopy</a>,      
00247     <a class="code" href="PVRShell_8h.html#a75a25">prefZbufferContext</a>,         
00248     <a class="code" href="PVRShell_8h.html#a75a26">prefLockableBackBuffer</a>,     
00249     <a class="code" href="PVRShell_8h.html#a75a27">prefSoftwareRendering</a>,      
00250     <a class="code" href="PVRShell_8h.html#a75a28">prefStencilBufferContext</a>,   
00251     <a class="code" href="PVRShell_8h.html#a75a29">prefOpenVGContext</a>,          
00252     <a class="code" href="PVRShell_8h.html#a75a30">prefAlphaFormatPre</a>,         
00253     <a class="code" href="PVRShell_8h.html#a75a31">prefPowerSaving</a>,            
00254 <span class="preprocessor">#ifdef PVRSHELL_FPS_OUTPUT</span>
00255 <span class="preprocessor"></span>    prefOutputFPS,              
00256 <span class="preprocessor">#endif</span>
00257 <span class="preprocessor"></span>    <a class="code" href="PVRShell_8h.html#a75a32">prefOutputInfo</a>,             
00258     <a class="code" href="PVRShell_8h.html#a75a33">prefNoShellSwapBuffer</a>       
00259 };
00260 
00261 <span class="comment">/*!***********************************************************************</span>
00262 <span class="comment"> * @Enum prefNameFloatEnum</span>
00263 <span class="comment"> * @Brief Float Shell preferences.</span>
00264 <span class="comment"> ************************************************************************/</span>
00265 <span class="keyword">enum</span> <a class="code" href="PVRShell_8h.html#a76">prefNameFloatEnum</a>
00266 {
00267     <a class="code" href="PVRShell_8h.html#a76a34">prefQuitAfterTime</a>           
00268 };
<a name="l00269"></a><a class="code" href="PVRShell_8h.html#a76">00269</a> 
00270 <span class="comment">/*!***********************************************************************</span>
00271 <span class="comment"> * @Enum prefNameIntEnum</span>
00272 <span class="comment"> * @Brief Integer Shell preferences.</span>
00273 <span class="comment"> ************************************************************************/</span>
00274 <span class="keyword">enum</span> <a class="code" href="PVRShell_8h.html#a77">prefNameIntEnum</a>
00275 {
00276     <a class="code" href="PVRShell_8h.html#a77a35">prefEGLMajorVersion</a>,    
00277     <a class="code" href="PVRShell_8h.html#a77a36">prefEGLMinorVersion</a>,    
<a name="l00278"></a><a class="code" href="PVRShell_8h.html#a77">00278</a>     <a class="code" href="PVRShell_8h.html#a77a37">prefWidth</a>,              
00279     <a class="code" href="PVRShell_8h.html#a77a38">prefHeight</a>,             
00280     <a class="code" href="PVRShell_8h.html#a77a39">prefPositionX</a>,          
00281     <a class="code" href="PVRShell_8h.html#a77a40">prefPositionY</a>,          
00282     <a class="code" href="PVRShell_8h.html#a77a41">prefQuitAfterFrame</a>,     
00283     <a class="code" href="PVRShell_8h.html#a77a42">prefSwapInterval</a>,       
00284     <a class="code" href="PVRShell_8h.html#a77a43">prefInitRepeats</a>,        
00285     <a class="code" href="PVRShell_8h.html#a77a44">prefFSAAMode</a>,           
00286     <a class="code" href="PVRShell_8h.html#a77a45">prefCommandLineOptNum</a>,  
00287     <a class="code" href="PVRShell_8h.html#a77a46">prefColorBPP</a>,           
00288     <a class="code" href="PVRShell_8h.html#a77a47">prefDepthBPP</a>,           
00289     <a class="code" href="PVRShell_8h.html#a77a48">prefRotateKeys</a>,         
00290     <a class="code" href="PVRShell_8h.html#a77a49">prefButtonState</a>,        
00291     <a class="code" href="PVRShell_8h.html#a77a50">prefCaptureFrameStart</a>,  
00292     <a class="code" href="PVRShell_8h.html#a77a51">prefCaptureFrameStop</a>,   
00293     <a class="code" href="PVRShell_8h.html#a77a52">prefPriority</a>,           
00294     <a class="code" href="PVRShell_8h.html#a77a53">prefConfig</a>,             
00295     <a class="code" href="PVRShell_8h.html#a77a54">prefRequestedConfig</a>,    
00296     <a class="code" href="PVRShell_8h.html#a77a55">prefNativeDisplay</a>       
00297 };
00298 
00299 <span class="comment">/*!***********************************************************************</span>
00300 <span class="comment"> * @Enum prefNamePtrEnum</span>
00301 <span class="comment"> * @Brief Pointers/Handlers Shell preferences.</span>
00302 <span class="comment"> ************************************************************************/</span>
00303 <span class="keyword">enum</span> <a class="code" href="PVRShell_8h.html#a78">prefNamePtrEnum</a>
00304 {
00305     <a class="code" href="PVRShell_8h.html#a78a56">prefD3DDevice</a>,          
00306     <a class="code" href="PVRShell_8h.html#a78a57">prefEGLDisplay</a>,         
<a name="l00307"></a><a class="code" href="PVRShell_8h.html#a78">00307</a>     <a class="code" href="PVRShell_8h.html#a78a58">prefEGLSurface</a>,         
00308     <a class="code" href="PVRShell_8h.html#a78a59">prefHINSTANCE</a>,          
00309     <a class="code" href="PVRShell_8h.html#a78a60">prefNativeWindowType</a>,   
00310     <a class="code" href="PVRShell_8h.html#a78a61">prefAccelerometer</a>,      
00311     <a class="code" href="PVRShell_8h.html#a78a62">prefPointerLocation</a>,    
00312     <a class="code" href="PVRShell_8h.html#a78a63">prefPVR2DContext</a>        
00313 };
00314 
00315 <span class="comment">/*!***********************************************************************</span>
00316 <span class="comment"> * @Enum prefNameConstPtrEnum</span>
00317 <span class="comment"> * @Brief Constant pointers Shell preferences.</span>
00318 <span class="comment"> ************************************************************************/</span>
00319 <span class="keyword">enum</span> <a class="code" href="PVRShell_8h.html#a79">prefNameConstPtrEnum</a>
00320 {
00321     <a class="code" href="PVRShell_8h.html#a79a64">prefAppName</a>,            
00322     <a class="code" href="PVRShell_8h.html#a79a65">prefReadPath</a>,           
<a name="l00323"></a><a class="code" href="PVRShell_8h.html#a79">00323</a>     <a class="code" href="PVRShell_8h.html#a79a66">prefWritePath</a>,          
00324     <a class="code" href="PVRShell_8h.html#a79a67">prefCommandLine</a>,        
00325     <a class="code" href="PVRShell_8h.html#a79a68">prefCommandLineOpts</a>,    
00326     <a class="code" href="PVRShell_8h.html#a79a69">prefExitMessage</a>,        
00327     <a class="code" href="PVRShell_8h.html#a79a70">prefVersion</a>             
00328 };
00329 
00330 <span class="comment">/****************************************************************************</span>
00331 <span class="comment"> PVRShell implementation Prototypes and definitions</span>
00332 <span class="comment">*****************************************************************************/</span>
00333 
00334 <span class="keyword">struct </span><a class="code" href="structPVRShellData.html">PVRShellData</a>;
00335 
00336 <span class="comment">/*!***************************************************************************</span>
00337 <span class="comment"> * @Class PVRShellInit</span>
00338 <span class="comment"> *****************************************************************************/</span>
00339 <span class="keyword">class </span><a class="code" href="classPVRShellInit.html">PVRShellInit</a>;
00340 
00341 <span class="comment">/*!***********************************************************************</span>
00342 <span class="comment"> *  @Struct SCmdLineOpt</span>
00343 <span class="comment"> *  @Brief Stores a variable name/value pair for an individual command-line option.</span>
00344 <span class="comment"> ************************************************************************/</span>
00345 <span class="keyword">struct </span><a class="code" href="structSCmdLineOpt.html">SCmdLineOpt</a>
00346 {
00347     <span class="keyword">const</span> <span class="keywordtype">char</span> *pArg, *pVal;
00348 };
<a name="l00349"></a><a class="code" href="structSCmdLineOpt.html">00349</a> 
00350 <span class="comment">/*!***************************************************************************</span>
<a name="l00351"></a><a class="code" href="structSCmdLineOpt.html#o1">00351</a> <span class="comment"> * @Class PVRShell</span>
00352 <span class="comment"> * @Brief Inherited by the application; responsible for abstracting the OS and API.</span>
00353 <span class="comment"> * @Description</span>
00354 <span class="comment"> *  PVRShell is the main Shell class that an application uses. An</span>
00355 <span class="comment"> *  application should supply a class which inherits PVRShell and supplies</span>
00356 <span class="comment"> *  implementations of the virtual functions of PVRShell (InitApplication(),</span>
00357 <span class="comment"> *  QuitApplication(), InitView(), ReleaseView(), RenderScene()). Default stub</span>
00358 <span class="comment"> *  functions are supplied; this means that an application is not</span>
00359 <span class="comment"> *  required to supply a particular function if it does not need to do anything</span>
00360 <span class="comment"> *  in it.</span>
00361 <span class="comment"> *  The other, non-virtual, functions of PVRShell are utility functions that the</span>
00362 <span class="comment"> *  application may call.</span>
00363 <span class="comment"> *****************************************************************************/</span>
00364 <span class="keyword">class </span><a class="code" href="classPVRShell.html">PVRShell</a>
00365 {
00366 <span class="keyword">private</span>:
00367     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classPVRShellInitOS.html">PVRShellInitOS</a>;
00368     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classPVRShellInit.html">PVRShellInit</a>;
<a name="l00369"></a><a class="code" href="classPVRShell.html">00369</a> 
00370     <a class="code" href="structPVRShellData.html">PVRShellData</a>    *m_pShellData;
00371     <a class="code" href="classPVRShellInit.html">PVRShellInit</a>    *m_pShellInit;
<a name="l00372"></a><a class="code" href="classPVRShell.html#n0">00372</a> 
<a name="l00373"></a><a class="code" href="classPVRShell.html#n1">00373</a> <span class="keyword">public</span>:
00374     <span class="comment">/*!***********************************************************************</span>
00375 <span class="comment">    @Function           PVRShell</span>
00376 <span class="comment">    @Description        Constructor</span>
00377 <span class="comment">    *************************************************************************/</span>
00378     <a class="code" href="classPVRShell.html#a0">PVRShell</a>();
00379 
00380     <span class="comment">/*!***********************************************************************</span>
00381 <span class="comment">    @Function           ~PVRShell</span>
00382 <span class="comment">    @Description        Destructor</span>
00383 <span class="comment">    *************************************************************************/</span>
00384     <span class="keyword">virtual</span> <a class="code" href="classPVRShell.html#a1">~PVRShell</a>();
00385 
00386     <span class="comment">/*</span>
00387 <span class="comment">        PVRShell functions that the application should implement.</span>
00388 <span class="comment">    */</span>
00389 
00390     <span class="comment">/*!***********************************************************************</span>
00391 <span class="comment">     @Function      InitApplication</span>
00392 <span class="comment">     @Return        true for success, false to exit the application</span>
00393 <span class="comment">     @Description   This function can be overloaded by the application. It</span>
00394 <span class="comment">                    will be called by PVRShell once only at the beginning of</span>
00395 <span class="comment">                    the PVRShell WinMain()/main() function. This function</span>
00396 <span class="comment">                    enables the user to perform any initialisation before the</span>
00397 <span class="comment">                    render API is initialised. From this function the user can</span>
00398 <span class="comment">                    call PVRShellSet() to change default values, e.g.</span>
00399 <span class="comment">                    requesting a particular resolution or device setting.</span>
00400 <span class="comment">    *************************************************************************/</span>
00401     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classPVRShell.html#a2">InitApplication</a>() { <span class="keywordflow">return</span> <span class="keyword">true</span>; };
00402 
00403     <span class="comment">/*!***********************************************************************</span>
00404 <span class="comment">     @Function      QuitApplication</span>
00405 <span class="comment">     @Return        true for success, false to exit the application</span>
00406 <span class="comment">     @Description   This function can be overloaded by the application. It</span>
00407 <span class="comment">                    will be called by PVRShell just before finishing the</span>
00408 <span class="comment">                    program. It enables the application to release any</span>
<a name="l00409"></a><a class="code" href="classPVRShell.html#a2">00409</a> <span class="comment">                    memory/resources acquired in InitApplication().</span>
00410 <span class="comment">    *************************************************************************/</span>
00411     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classPVRShell.html#a3">QuitApplication</a>() { <span class="keywordflow">return</span> <span class="keyword">true</span>; };
00412 
00413     <span class="comment">/*!***********************************************************************</span>
00414 <span class="comment">     @Function      InitView</span>
00415 <span class="comment">     @Return        true for success, false to exit the application</span>
00416 <span class="comment">     @Description   This function can be overloaded by the application. It</span>
00417 <span class="comment">                    will be called by PVRShell after the OS and rendering API</span>
00418 <span class="comment">                    are initialised, before entering the RenderScene() loop.</span>
00419 <span class="comment">                    It is called any time the rendering API is initialised,</span>
<a name="l00420"></a><a class="code" href="classPVRShell.html#a3">00420</a> <span class="comment">                    i.e. once at the beginning, and possibly again if the</span>
00421 <span class="comment">                    resolution changes, or a power management even occurs, or</span>
00422 <span class="comment">                    if the app requests a reinialisation.</span>
00423 <span class="comment">                    The application should check here the configuration of</span>
00424 <span class="comment">                    the rendering API; it is possible that requests made in</span>
00425 <span class="comment">                    InitApplication() were not successful.</span>
00426 <span class="comment">                    Since everything is initialised when this function is</span>
00427 <span class="comment">                    called, you can load textures and perform rendering API</span>
00428 <span class="comment">                    functions.</span>
00429 <span class="comment">    *************************************************************************/</span>
00430     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classPVRShell.html#a4">InitView</a>() { <span class="keywordflow">return</span> <span class="keyword">true</span>; };
00431 
00432     <span class="comment">/*!***********************************************************************</span>
00433 <span class="comment">     @Function      ReleaseView</span>
00434 <span class="comment">     @Return        true for success, false to exit the application</span>
00435 <span class="comment">     @Description   This function can be overloaded by the application. It</span>
00436 <span class="comment">                    will be called after the RenderScene() loop, before</span>
00437 <span class="comment">                    shutting down the render API. It enables the application</span>
00438 <span class="comment">                    to release any memory/resources acquired in InitView().</span>
00439 <span class="comment">    *************************************************************************/</span>
<a name="l00440"></a><a class="code" href="classPVRShell.html#a4">00440</a>     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classPVRShell.html#a5">ReleaseView</a>() {  <span class="keywordflow">return</span> <span class="keyword">true</span>; };
00441 
00442     <span class="comment">/*!***********************************************************************</span>
00443 <span class="comment">     @Function      RenderScene</span>
00444 <span class="comment">     @Return        true for success, false to exit the application</span>
00445 <span class="comment">     @Description   This function can be overloaded by the application.</span>
00446 <span class="comment">                    It is main application function in which you have to do your own rendering.  Will be</span>
00447 <span class="comment">                    called repeatedly until the application exits.</span>
00448 <span class="comment">    *************************************************************************/</span>
00449     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classPVRShell.html#a6">RenderScene</a>() { <span class="keywordflow">return</span> <span class="keyword">true</span>; };
00450 
<a name="l00451"></a><a class="code" href="classPVRShell.html#a5">00451</a>     <span class="comment">/*</span>
00452 <span class="comment">        PVRShell functions available for the application to use.</span>
00453 <span class="comment">    */</span>
00454 
00455     <span class="comment">/*!***********************************************************************</span>
00456 <span class="comment">     @Function      PVRShellSet</span>
00457 <span class="comment">     @Input         prefName                Name of preference to set to value</span>
00458 <span class="comment">     @Input         value                   Value</span>
00459 <span class="comment">     @Return        true for success</span>
00460 <span class="comment">     @Description   This function is used to pass preferences to the PVRShell.</span>
<a name="l00461"></a><a class="code" href="classPVRShell.html#a6">00461</a> <span class="comment">                    If used, it must be called from InitApplication().</span>
00462 <span class="comment">    *************************************************************************/</span>
00463     <span class="keywordtype">bool</span> <a class="code" href="classPVRShell.html#a7">PVRShellSet</a>(<span class="keyword">const</span> prefNameBoolEnum prefName, <span class="keyword">const</span> <span class="keywordtype">bool</span> value);
00464 
00465     <span class="comment">/*!***********************************************************************</span>
00466 <span class="comment">     @Function      PVRShellSet</span>
00467 <span class="comment">     @Input         prefName                Name of preference to set to value</span>
00468 <span class="comment">     @Input         value                   Value</span>
00469 <span class="comment">     @Return        true for success</span>
00470 <span class="comment">     @Description   This function is used to pass preferences to the PVRShell.</span>
00471 <span class="comment">                    If used, it must be called from InitApplication().</span>
00472 <span class="comment">    *************************************************************************/</span>
00473     <span class="keywordtype">bool</span> <a class="code" href="classPVRShell.html#a7">PVRShellSet</a>(<span class="keyword">const</span> prefNameFloatEnum prefName, <span class="keyword">const</span> <span class="keywordtype">float</span> value);
00474 
00475     <span class="comment">/*!***********************************************************************</span>
00476 <span class="comment">     @Function      PVRShellSet</span>
00477 <span class="comment">     @Input         prefName                Name of preference to set to value</span>
00478 <span class="comment">     @Input         value                   Value</span>
00479 <span class="comment">     @Return        true for success</span>
00480 <span class="comment">     @Description   This function is used to pass preferences to the PVRShell.</span>
00481 <span class="comment">                    If used, it must be called from InitApplication().</span>
00482 <span class="comment">    *************************************************************************/</span>
00483     <span class="keywordtype">bool</span> <a class="code" href="classPVRShell.html#a7">PVRShellSet</a>(<span class="keyword">const</span> prefNameIntEnum prefName, <span class="keyword">const</span> <span class="keywordtype">int</span> value);
00484 
00485     <span class="comment">/*!***********************************************************************</span>
00486 <span class="comment">     @Function      PVRShellSet</span>
00487 <span class="comment">     @Input         prefName                Name of preference to set to value</span>
00488 <span class="comment">     @Input         ptrValue                Value</span>
00489 <span class="comment">     @Return        true for success</span>
00490 <span class="comment">     @Description   This function is used to pass preferences to the PVRShell.</span>
00491 <span class="comment">                    If used, it must be called from InitApplication().</span>
00492 <span class="comment">    *************************************************************************/</span>
00493     <span class="keywordtype">bool</span> <a class="code" href="classPVRShell.html#a7">PVRShellSet</a>(<span class="keyword">const</span> prefNamePtrEnum prefName, <span class="keyword">const</span> <span class="keywordtype">void</span> * <span class="keyword">const</span> ptrValue);
00494 
00495     <span class="comment">/*!***********************************************************************</span>
00496 <span class="comment">     @Function      PVRShellSet</span>
00497 <span class="comment">     @Input         prefName                Name of preference to set to value</span>
00498 <span class="comment">     @Input         ptrValue                Value</span>
00499 <span class="comment">     @Return        true for success</span>
00500 <span class="comment">     @Description   This function is used to pass preferences to the PVRShell.</span>
00501 <span class="comment">                    If used, it must be called from InitApplication().</span>
00502 <span class="comment">    *************************************************************************/</span>
00503     <span class="keywordtype">bool</span> <a class="code" href="classPVRShell.html#a7">PVRShellSet</a>(<span class="keyword">const</span> prefNameConstPtrEnum prefName, <span class="keyword">const</span> <span class="keywordtype">void</span> * <span class="keyword">const</span> ptrValue);
00504 
00505     <span class="comment">/*!***********************************************************************</span>
00506 <span class="comment">     @Function      PVRShellGet</span>
00507 <span class="comment">     @Input         prefName                Name of preference to set to value</span>
00508 <span class="comment">     @Return        Value asked for.</span>
00509 <span class="comment">     @Description   This function is used to get parameters from the PVRShell</span>
00510 <span class="comment">                    It can be called from any where in the program.</span>
00511 <span class="comment">    *************************************************************************/</span>
00512     <span class="keywordtype">bool</span> <a class="code" href="classPVRShell.html#a12">PVRShellGet</a>(<span class="keyword">const</span> prefNameBoolEnum prefName) <span class="keyword">const</span>;
00513 
00514     <span class="comment">/*!***********************************************************************</span>
00515 <span class="comment">    @Function       PVRShellGet</span>
00516 <span class="comment">    @Input          prefName                Name of preference to set to value</span>
00517 <span class="comment">    @Return         Value asked for.</span>
00518 <span class="comment">    @Description    This function is used to get parameters from the PVRShell</span>
00519 <span class="comment">                    It can be called from any where in the program.</span>
00520 <span class="comment">    *************************************************************************/</span>
00521     <span class="keywordtype">float</span> <a class="code" href="classPVRShell.html#a12">PVRShellGet</a>(<span class="keyword">const</span> prefNameFloatEnum prefName) <span class="keyword">const</span>;
00522 
00523     <span class="comment">/*!***********************************************************************</span>
00524 <span class="comment">    @Function       PVRShellGet</span>
00525 <span class="comment">    @Input          prefName                Name of preference to set to value</span>
00526 <span class="comment">    @Return         Value asked for.</span>
00527 <span class="comment">    @Description    This function is used to get parameters from the PVRShell</span>
00528 <span class="comment">                    It can be called from any where in the program.</span>
00529 <span class="comment">    *************************************************************************/</span>
00530     <span class="keywordtype">int</span> <a class="code" href="classPVRShell.html#a12">PVRShellGet</a>(<span class="keyword">const</span> prefNameIntEnum prefName) <span class="keyword">const</span>;
00531 
00532     <span class="comment">/*!***********************************************************************</span>
00533 <span class="comment">    @Function       PVRShellGet</span>
00534 <span class="comment">    @Input          prefName                Name of preference to set to value</span>
00535 <span class="comment">    @Return         Value asked for.</span>
00536 <span class="comment">    @Description    This function is used to get parameters from the PVRShell</span>
00537 <span class="comment">                    It can be called from any where in the program.</span>
00538 <span class="comment">    *************************************************************************/</span>
00539     <span class="keywordtype">void</span> *<a class="code" href="classPVRShell.html#a12">PVRShellGet</a>(<span class="keyword">const</span> prefNamePtrEnum prefName) <span class="keyword">const</span>;
00540 
00541     <span class="comment">/*!***********************************************************************</span>
00542 <span class="comment">    @Function       PVRShellGet</span>
00543 <span class="comment">    @Input          prefName                Name of preference to set to value</span>
00544 <span class="comment">    @Return         Value asked for.</span>
00545 <span class="comment">    @Description    This function is used to get parameters from the PVRShell</span>
00546 <span class="comment">                    It can be called from any where in the program.</span>
00547 <span class="comment">    *************************************************************************/</span>
00548     <span class="keyword">const</span> <span class="keywordtype">void</span> *<a class="code" href="classPVRShell.html#a12">PVRShellGet</a>(<span class="keyword">const</span> prefNameConstPtrEnum prefName) <span class="keyword">const</span>;
00549 
00550     <span class="comment">/*!***********************************************************************</span>
00551 <span class="comment">     @Function      PVRShellScreenCaptureBuffer</span>
00552 <span class="comment">     @Input         Width           size of image to capture (relative to 0,0)</span>
00553 <span class="comment">     @Input         Height          size of image to capture (relative to 0,0)</span>
00554 <span class="comment">     @Modified      pLines          receives a pointer to an area of memory containing the screen buffer.</span>
00555 <span class="comment">     @Return        true for success</span>
00556 <span class="comment">     @Description   It will be stored as 24-bit per pixel, 8-bit per chanel RGB. The</span>
00557 <span class="comment">                    memory should be freed with free() when no longer needed.</span>
00558 <span class="comment">    *************************************************************************/</span>
00559     <span class="keywordtype">bool</span> <a class="code" href="classPVRShell.html#a17">PVRShellScreenCaptureBuffer</a>(<span class="keyword">const</span> <span class="keywordtype">int</span> Width, <span class="keyword">const</span> <span class="keywordtype">int</span> Height, <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> **pLines);
00560 
00561     <span class="comment">/*!***********************************************************************</span>
00562 <span class="comment">     @Function      PVRShellScreenSave</span>
00563 <span class="comment">     @Input         fname           base of file to save screen to</span>
00564 <span class="comment">     @Modified      pLines          image data to write out (24bpp, 8-bit per channel RGB)</span>
00565 <span class="comment">     @Output        ofname          If non-NULL, receives the filename actually used</span>
00566 <span class="comment">     @Return        true for success</span>
00567 <span class="comment">     @Description   Writes out the image data to a BMP file with basename</span>
00568 <span class="comment">                    fname. The file written will be fname suffixed with a</span>
00569 <span class="comment">                    number to make the file unique.</span>
00570 <span class="comment">                    For example, if fname is "abc", this function will attempt</span>
00571 <span class="comment">                    to save to "abc0000.bmp"; if that file already exists, it</span>
00572 <span class="comment">                    will try "abc0001.bmp", repeating until a new filename is</span>
00573 <span class="comment">                    found. The final filename used is returned in ofname.</span>
00574 <span class="comment">    *************************************************************************/</span>
00575     <span class="keywordtype">int</span> <a class="code" href="classPVRShell.html#a18">PVRShellScreenSave</a>(
00576         <span class="keyword">const</span> <span class="keywordtype">char</span>          * <span class="keyword">const</span> fname,
00577         <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> * <span class="keyword">const</span> pLines,
00578         <span class="keywordtype">char</span>                * <span class="keyword">const</span> ofname = NULL);
00579 
00580     <span class="comment">/*!***********************************************************************</span>
00581 <span class="comment">     @Function      PVRShellWriteBMPFile</span>
00582 <span class="comment">     @Input         pszFilename     file to save screen to</span>
00583 <span class="comment">     @Input         uWidth          the width of the data</span>
00584 <span class="comment">     @Input         uHeight         the height of the data</span>
00585 <span class="comment">     @Input         pImageData      image data to write out (24bpp, 8-bit per channel RGB)</span>
00586 <span class="comment">     @Return        0 on success</span>
00587 <span class="comment">     @Description   Writes out the image data to a BMP file with name fname.</span>
00588 <span class="comment">    *************************************************************************/</span>
00589     <span class="keywordtype">int</span> <a class="code" href="classPVRShell.html#a19">PVRShellWriteBMPFile</a>(
00590         <span class="keyword">const</span> <span class="keywordtype">char</span>          * <span class="keyword">const</span> pszFilename,
00591         <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> uWidth,
00592         <span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> uHeight,
00593         <span class="keyword">const</span> <span class="keywordtype">void</span>          * <span class="keyword">const</span> pImageData);
00594 
00595     <span class="comment">/*!***********************************************************************</span>
00596 <span class="comment">    @Function       PVRShellOutputDebug</span>
00597 <span class="comment">    @Input          format          printf style format followed by arguments it requires</span>
00598 <span class="comment">    @Description    Writes the resultant string to the debug output (e.g. using</span>
00599 <span class="comment">    printf(), OutputDebugString(), ...). Check the SDK release notes for</span>
00600 <span class="comment">    details on how the string is output.</span>
00601 <span class="comment">    *************************************************************************/</span>
00602     <span class="keywordtype">void</span> <a class="code" href="classPVRShell.html#a20">PVRShellOutputDebug</a>(<span class="keywordtype">char</span> <span class="keyword">const</span> * <span class="keyword">const</span> format, ...) <span class="keyword">const</span>;
00603 
00604     <span class="comment">/*!***********************************************************************</span>
00605 <span class="comment">     @Function      PVRShellGetTime</span>
00606 <span class="comment">     @Returns       A value which increments once per millisecond.</span>
00607 <span class="comment">     @Description   The number itself should be considered meaningless; an</span>
00608 <span class="comment">                    application should use this function to determine how much</span>
00609 <span class="comment">                    time has passed between two points (e.g. between each</span>
00610 <span class="comment">                    frame).</span>
00611 <span class="comment">    *************************************************************************/</span>
00612     <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="classPVRShell.html#a21">PVRShellGetTime</a>();
00613 
00614     <span class="comment">/*!***********************************************************************</span>
00615 <span class="comment">     @Function      PVRShellIsKeyPressed</span>
00616 <span class="comment">     @Input         key     Code of the key to test</span>
00617 <span class="comment">     @Return        true if key was pressed</span>
00618 <span class="comment">     @Description   Check if a key was pressed. The keys on various devices</span>
00619 <span class="comment">     are mapped to the PVRShell-supported keys (listed in @a PVRShellKeyName) in</span>
00620 <span class="comment">     a platform-dependent manner, since most platforms have different input</span>
00621 <span class="comment">     devices. Check the SDK release notes for details on how the enum values</span>
00622 <span class="comment">     map to your device's input device.</span>
00623 <span class="comment">    *************************************************************************/</span>
00624     <span class="keywordtype">bool</span> <a class="code" href="classPVRShell.html#a22">PVRShellIsKeyPressed</a>(<span class="keyword">const</span> PVRShellKeyName key);
00625 };
00626 
00627 <span class="comment">/****************************************************************************</span>
00628 <span class="comment">** Declarations for functions that the scene file must supply</span>
00629 <span class="comment">****************************************************************************/</span>
00630 
00631 <span class="comment">/*!***************************************************************************</span>
00632 <span class="comment"> @Function      NewDemo</span>
00633 <span class="comment"> @Return        The demo supplied by the user</span>
00634 <span class="comment"> @Description   This function must be implemented by the user of the shell.</span>
00635 <span class="comment">                The user should return its PVRShell object defining the</span>
00636 <span class="comment">                behaviour of the application</span>
00637 <span class="comment">*****************************************************************************/</span>
00638 <a class="code" href="classPVRShell.html">PVRShell</a>* <a class="code" href="PVRShell_8h.html#a71">NewDemo</a>();
00639 
00640 <span class="preprocessor">#endif </span><span class="comment">/* __PVRSHELL_H_ */</span>
00641 
00642 <span class="comment">/*****************************************************************************</span>
00643 <span class="comment"> End of file (PVRShell.h)</span>
00644 <span class="comment">*****************************************************************************/</span>
00645 
00646 
</pre></div><br>
<br>
<P align=left><FONT size=2><STRONG><A 
   href="http://www.imgtec.com/powervr/insider/legal/index.asp">Copyright</A> � 
   1999-2008, Imagination Technologies Ltd.</STRONG></FONT></P>
<hr>
<address style="align: left;"><small><FONT color=f0f>
Generated by <a href="http://www.doxygen.org/index.html">DOXYGEN</a> 1.3.6</small></address>
</body>
</html>
